<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 	xmlns="http://www.w3.org/1999/xhtml"
    	xmlns:ui="http://java.sun.com/jsf/facelets"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:p="http://primefaces.org/ui"
    	xmlns:ec="http://www.b2cexpress.com.br/ecommerce"
    	xmlns:s="http://www.suricattus.com.br/jsf/ui"
		xmlns:sf="http://www.suricattus.com.br/jsf/fn"
    	xmlns:composite="http://java.sun.com/jsf/composite">
    	
	<composite:interface>
		<composite:attribute name="active" required="true" />
	</composite:interface>
	
	<composite:implementation>
		
		<div class="container-fluid" id="main-container">		
			<div id="sidebar">
				<div id="sidebar-shortcuts">
				</div>
		
				<ul class="nav nav-list">
					<li class="#{cc.attrs.active eq 'dashboard' ? 'active' : ''}">
						<h:link outcome="pretty:adminRevendedor">
							<p:spacer width="2"/>
							<h:graphicImage library="img" name="template/1370995680_home.png" styleClass="icone" />
							<p:spacer width="2"/>
							<span>
								#{labels['label.inicio']}
							</span>
						</h:link>
					</li>
					
					<li class="open">
						<a href="#">
							<p:spacer width="2"/>
							<h:graphicImage library="img" name="template/1370987209_cog_edit.png" styleClass="icone" />
							<p:spacer width="2"/>
							<span>#{labels['label.configuracao']}</span>
						</a>
						
						<ul class="submenu" style="display: block;">
							<li class="#{cc.attrs.active eq 'alterarSenhaUsuarioRevendedor' ? 'active' : ''}">
								<h:link outcome="pretty:alterarSenhaUsuarioRevendedor">
									<i class="icon-arrow-right"></i>
									#{labels['label.configuracao.alterar.senha']}
								</h:link>
							</li>
						</ul>						
					</li>
		
					<s:hasAllRoles roles="ROLE_REVENDEDOR_ADMINISTRADOR">
						<li class="open">
							<a href="#">
								<p:spacer width="2"/>
								<h:graphicImage library="img" name="template/administracao.png" styleClass="icone" />
								<p:spacer width="2"/>
								<span>#{labels['label.administracao']}</span>
							</a>
			
							<ul class="submenu" style="display: block;">
								<li class="#{cc.attrs.active eq 'comprarCredito' ? 'active' : ''}">
									<h:link outcome="pretty:comprarCredito">
										<i class="icon-arrow-right"></i>
										#{labels['botao.credito']}
									</h:link>
								</li>
								
								<li class="#{cc.attrs.active eq 'confirmarRessuprimentoLimiteCredito' ? 'active' : ''}">
									<h:link outcome="pretty:confirmarRessuprimentoLimiteCredito" rendered="#{securityController.revendedorAutorizado}">
										<i class="icon-arrow-right"></i>
										#{labels['label.limite.credito.aprovar']}
									</h:link>
								</li>
			
								<li class="#{cc.attrs.active eq 'extrato' ? 'active' : ''}">
									<h:link outcome="pretty:extrato">
										<i class="icon-arrow-right"></i>
										#{labels['botao.extrato']}
									</h:link>
								</li>
			
								<li class="#{cc.attrs.active eq 'resgateCredito' ? 'active' : ''}">
									<h:link outcome="pretty:resgatarCredito">
										<i class="icon-arrow-right"></i>
										#{labels['label.resgate.saldo']}
									</h:link>
								</li>
								
								<li class="#{cc.attrs.active eq 'desempenho' ? 'active' : ''}">
									<h:link outcome="pretty:desempenho">
										<i class="icon-arrow-right"></i>
										#{labels['botao.desempenho']}
									</h:link>
								</li>
							</ul>
						</li>
						
						<li class="#{cc.attrs.active eq 'vendedor' ? 'active' : ''}">
							<h:link outcome="pretty:pesquisarVendedor">
								<p:spacer width="2"/>
								<h:graphicImage library="img" name="template/1370986833_groupevent.png" styleClass="icone" />
								<p:spacer width="2"/>
								<span>#{labels['label.vendedores']}</span>
							</h:link>
						</li>
						
						<li class="open">
							<a href="#">
								<p:spacer width="2"/>
								<h:graphicImage library="img" name="template/prestacao_contas.png" styleClass="icone" />
								<p:spacer width="2"/>
								<span>#{labels['label.financeiro']}</span>
							</a>
							
							<ul class="submenu" style="display: block;">
								<li class="#{cc.attrs.active eq 'prestacaoConta' ? 'active' : ''}">
									<h:link outcome="pretty:pesquisarBoletosRevendedor">
										<i class="icon-arrow-right"></i>
										#{labels['label.financeiro.prestacao.contas']}
									</h:link>
								</li>							
							</ul>						
						</li>
						
					</s:hasAllRoles>
		
				</ul>
		
			</div>
		</div>		
	</composite:implementation>
	
</html>
